//
//  RegisterMoreTextTableViewCell.m
//  SafeFoodManagerDemo
//
//  Created by bob on 2017/10/18.
//  Copyright © 2017年 bob. All rights reserved.
//

#import "RegisterMoreTextTableViewCell.h"
#import "UILabel+NSAttributeString.h"
@implementation RegisterMoreTextTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setTitleName:(NSString *)TitleName
{
    _TitleName=TitleName;
    
    self.RtitleLabel.attributedText= [self.RtitleLabel MarkWithStr:TitleName];
    
}


-(void)setVaildType:(NSString *)VaildType
{
    _VaildType=VaildType;
    
    if ([VaildType isEqualToString:@"tel"]) {
        
        self.RTextView.keyboardType=UIKeyboardTypePhonePad;
        
    }else if ([VaildType isEqualToString:@"num"])
    {
        self.RTextView.keyboardType=UIKeyboardTypeDecimalPad;
        
    }else if ([VaildType isEqualToString:@"url"])
    {
        self.RTextView.keyboardType=UIKeyboardTypeURL;
        
    }else if ([VaildType isEqualToString:@"email"])
    {
        self.RTextView.keyboardType=UIKeyboardTypeEmailAddress;
        
    }else if ([VaildType isEqualToString:@"phone"]||[VaildType isEqualToString:@"idCard"])
    {
        self.RTextView.keyboardType=UIKeyboardTypeNumbersAndPunctuation;
        
    }else{
        
        self.RTextView.keyboardType=UIKeyboardTypeDefault;
        
    }
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
